{{- if and .Values.spark.enabled .Values.spark.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
  name: {{ template "jaeger.spark.serviceAccountName" . }}
  labels:
    {{- include "jaeger.labels" . | nindent 4 }}
    app.kubernetes.io/component: spark
automountServiceAccountToken: {{ .Values.spark.serviceAccount.automountServiceAccountToken }}
{{- end -}}
